#include "mainwindow.h"
#include "ui_mainwindow.h"

#include <QStandardPaths>
#include <JlCompress.h>

static void compressDir(QString);
static void extractDir(QString);

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QString location = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);

//    compressDir(location);
    extractDir(location);
}

void compressDir(QString path)
{
    JlCompress::compressFile(path + "/test.zip",path + "/test.txt");
//    JlCompress::compressFiles(QString fileCompressed, QStringList files);
//    JlCompress::compressDir(QString fileCompressed, QString dir);
}

void extractDir(QString path)
{
//    JlCompress::extractFile(QString fileCompressed, QString fileName);
//    JlCompress::extractFiles(QString fileCompressed, QStringList files);
    JlCompress::extractDir(path + "/test.zip", path);
}

MainWindow::~MainWindow()
{
    delete ui;
}
